<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件修饰符</title>
    <style>
        .div1{
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .div2{
            width: 200px;
            height: 200px;
            background-color: blue;
        }
    </style>
</head>
<body>
 <div id="app">
   <div class="div1" @click="divEvent1" @contextmenu.prevent></div>
   <div class="div2" @click.stop="divEvent2"></div>
 </div>
 <script src="./vue.global.js"></script>
 <script>
     const vue=Vue.createApp({
         data(){
             return{

             }
         },
         methods:{
             divEvent1(){
                 alert(1)
             },
             divEvent2(){
                 alert(2)
             },
         }
     }).mount('#app')
 </script>
</body>
</html>